package Dao;

import Model.*;

import java.sql.SQLException;
import java.util.List;

public interface UserDAO {
    // 添加用户
    void addUser(User user) throws SQLException;
    // 更新用户信息
    void updateUser(User user) throws SQLException;
    // 通过用户名获取用户信息
    User getUsrByName(String name) throws SQLException;
    User getUserById(int id) throws SQLException;
    //查询所有用户
    User[] getAllUser() throws SQLException;
    // 删除用户
    void deleteUser(String username) throws SQLException;


    // 添加用户产品
    void addUserFinancialProduct(UserFinancialProduct userFinancialProduct) throws SQLException;

    List<UserFinancialProduct> getUserFinancialProducts(int userId) throws SQLException;

    void updateUserFinancialProductStatus(UserFinancialProduct productToCancel) throws SQLException;

    void deleteUserFinancialProduct(int Id) throws SQLException;

}
